@extends('layouts.default')
@section('content')
<br/><div style="background-color:#bbddf5">
{{ Form::open(array('method' => 'get', 'action' => 'BookingController@index','class'=>'form-horizontal')) }}
{{ Form::checkbox('old', 'yes') }} Old
{{ Form::checkbox('pending', 'yes') }} Pending
{{ Form::checkbox('booked', 'yes') }} Booked
{{ Form::submit('Filtro', array('class'=>'btn btn-sm btn-default')) }}
{{ Form::close() }}
</div>
<div class="box">

    <header>
        <div class="icons">
            <i class="fa fa-table"></i>
        </div>
        <h5>{{ Lang::get('messages.online_reservations') }}</h5>
    </header>

    <div id="collapse4" class="body">
        <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th>{{ Lang::get('messages.vehicle')}}</th>
                    <th>{{ Lang::get('messages.customer') }} </th>
                    <th>{{ Lang::get('messages.status') }} </th>
                    <th>{{ Lang::get('rentals.prepaid') }} </th>
                    <th>{{ Lang::get('messages.total_price') }} </th>
                    <th>{{ Lang::get('messages.start_date') }} </th>
                    <th>{{ Lang::get('messages.end_date') }} </th>
                    <th>{{ Lang::get('rentals.invoice') }} </th>
                </tr>
            </thead>
            <tbody>
                @foreach($values as $v ) 
                
                <tr>
                    <td>{{$v->Make.' '.$v->License}}</td>
                    <td>{{$v->drfirstname .' '.$v->drlastname}}</td>
                    <td>{{$v->Bstatus}}</td>
                    <td>{{$v->prepaid.' '.$v->curency}}</td>
                    <td>{{$v->totalpaid.' '.$v->curency}}</td>
                    <td>{{$v->STARTTIME}}</td>
                    <td>{{$v->ENDTIME}}</td>
                    @if($v->statusID == 4)
                    <td>{{link_to_action('BookingController@online_invoice', 
                            Lang::get('rentals.invoice'), array('id'=>$v->rentalId))}}</td>
                    @else
                    <td></td>
                    @endif
                </tr>                 
                @endforeach                            
            </tbody>
        </table>
    </div>
</div>
@stop